#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using pii = pair<int, int>;
#define rep(i, a, b) for (int i = (a); i <= (b); i++)
#define per(i, a, b) for (int i = (a); i >= (b); i--)
#define endl '\n'
const int N = 2e5 + 5;

int n, d;
ll v[N], p[N];
ll dis[N];
ll cost[N];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> d;
  rep(i, 2, n) cin >> dis[i];
  rep(i, 2, n) dis[i] += dis[i - 1];  // 距离起始点距离
  rep(i, 1, n) cin >> p[i];
  rep(i, 2, n) p[i] = min(p[i - 1], p[i]);   // 最低价格
  rep(i, 1, n) v[i] = (dis[i] + d - 1) / d;  // 到站需要油量
  ll sum = 0;
  rep(i, 1, n - 1) ll x = sum += p[i] * (v[i + 1] - v[i]);
  cout << sum;
  return 0;
}